package com.bookxml;
import com.bookxml.service.BookShopService;
import com.bookxml.service.Cashier;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Arrays;

/**
 * Created by Admin on 9/19 0019.
 */
public class BookShopTest {
    ApplicationContext con=null;
    BookShopDao bookShopDao=null;
    BookShopService bookShopService=null;
    Cashier cashier=null;
    {
        con=new ClassPathXmlApplicationContext("bookxml.xml");
        bookShopDao=con.getBean(BookShopDao.class);
        bookShopService=con.getBean(BookShopService.class);
        cashier=con.getBean(Cashier.class);
    }
    @Test
    public void checkout(){
       cashier.checkout("AA", Arrays.asList("1001","1002"));
    }
}
